{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Opening the documentation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Website address"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The documentation can be found here\n",
    "https://qiskit.org/documentation/metal/"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Access the docs through code\n",
    "Utilize the `open_docs()` function to load the docs in a web browser."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from qiskit_metal import open_docs\n",
    "open_docs()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Build the documentation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you choose to build the docs yourself rather than access them on the website, you'll want to run the script locally.  **This will produce an error if executed within a jupyter notebook**, so be sure to execute this command in ipython directly.\n",
    "\n",
    "Replace the path below with the relative path to the build_docs.py script on your computer.\n",
    "\n",
    "``` python\n",
    "%run ../../docs/build_docs.py\n",
    "```\n",
    "\n",
    "#### Please be patient. The build can take ~15minutes. stdout might appear in the shell used to launch jupyter notebook.\n",
    "\n",
    "The build has two phases. First it will install the required python libraries for the build. Then it will run the `make html` command to complete the build."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### You can now access the documentation with the following command.\n",
    "\n",
    "You can also directly open: `../../docs/build/html/index.html`"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
